// TOWN DIALOGUE SCRIPT
//    Town 7: Farthest

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Father Ian ***
begintalknode 1;
	state = -1;
	personality = 237;
	nextstate = 2;
	condition = 1;
	question = "Father Ian";
	text1 = "A priest is busy tending to the needs of the village up by the alter.";
	text2 = "He smiles as he sees you saying _Hello children, I'm Father Ian._";
	text3 = "_Do you need healing?_";
	text5 = "Father Ian smiles as you approach.";
	text6 = "_Hello again my children, do you require healing?_";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Father Ian laughs _Why I tend to the needs of the village._";
	text2 = "_Mainly providing healing and absolution for those in need._";
	text3 = "_My healing skills are legendary, though I require a small donation of 50 coins._";
	text3 = "_Are you in need of healing?_ he adds.";

begintalknode 3;
	state = 2;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "Where are you when you are not here.";
	text1 = "Father Ian answers _I tend to needs in three villages._";
	text2 = "_Cresent Harbor, Asner and Farthest._";
	text3 = "_I can always be found in one of those villages._";
	text4 = "_Since you have found me, do you require healing?_ he adds.";

begintalknode 4;
	state = 2;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "What do you know of the she-devil.";
	text1 = "_She's an aberration against all that is right._";
	text2 = "_Fortunately I have avoided her, and likewise, she has avoided me._";

begintalknode 5;
	state = 2;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "Can I get some healing (pay 50 coins)?";
	text1 = "Father Ian says _I am sorry, but I have to be firm with the 50 coin donation before performing any healing._";
	text3 = "_Ah, we are blessed, you don't need any healing after all._";
	text5 = "Father Ian places his hand on your head.  You feel your energy and strength returning.  With a flash, you are completely healed.";
	code =
		clear_strings();
		if (coins_amount() < 50) 
			add_string(1);
		else if (run_select_a_pc(1) == 0)
			add_string(3);
		else {
			play_sound(24);
			add_string(5);
			restore_pc(get_selected_pc());
			change_coins(-50);
		}
	break;

// *** Jackie ***
begintalknode 10;
	state = -1;
	personality = 707;
	nextstate = 11;
	condition = 1;
	question = "Jackie";
	text1 = "A pretty blond woman is working behind the counter of the magic shop.";
	text2 = "She looks at the party suspiciously before grudgingly offering her name _I'm Jackie._";
	text3 = "_What do you want?_";
	text5 = "Jackie stares at you from behind the counter.";
	text6 = "_You're back?  What do you want?_";
	action = INTRO;
	code =
		set_flag(7, 9, 1);
	break;

begintalknode 11;
	state = 11;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jackie stares at you, then waves at the magical items laying around.";
	text2 = "_I sell this to whoever wants to buy._";
	text3 = "She doesn't seem to be in a talkative mood.";

begintalknode 12;
	state = 11;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "I'd like to buy some stuff.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Farthest Magic", "Jackie has a collection of unique magic items for sale.  Prices are astronomical.", 15, 6, 6);
	break;

begintalknode 15;
	state = -1;
	personality = 707;
	nextstate = 16;
	condition = 1;
	question = "Jackie";
	text1 = "A pretty blond woman is working behind the counter sorting some items.";
	text2 = "She looks up suspiciously until recognizing the party, then smiles and says _I'm Jackie._";
	text3 = "_What can I help you with?_";
	text5 = "Jackie, recognizing the party, smiles and asks _What can I help you with?_";
	code =
		if (get_flag(7, 9) == 0) {
			set_flag(7, 9, 1);
			remove_string(5);
		}
		else {
			clear_strings();
			add_string(5);
		}
	break;

begintalknode 16;
	state = 16;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jackie answers _I run the magic shop here in Farthest._";
	text2 = "_Can I show you something magical?_ she asks.";

begintalknode 17;
	state = 16;
	personality = 707;
	nextstate = 20;
	condition = 1;
	question = "What is this place?";
	text1 = "Jackie seems to swell with pride before answering.";
	text2 = "_In the past, this village was important to the empire hosting a contingent of watchers._";
	text3 = "_With the Avernum problem resolved, the empire didn't need them here any more._";
	text4 = "_Of course the watchers tower still sits at the south end of town._";

begintalknode 18;
	state = 16;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "What do you know of the she-devil?";
	text1 = "Jackie snorts _That hag came running up from the south awhile back screaming about losing something._";
	text2 = "_We chased her out of town and she ain't been back._ Jackie says with a smile.";
	text3 = "_Of course, you have taken care of her, so I guess she won't be a problem now to anyone else._";
	code =
		if (get_flag(50, 1) == 0)
			remove_string(3);
	break;

begintalknode 19;
	state = 16;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "I'd like to see you magical goods.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Farthest Magic", "Jackie has a collection of unique magic items for sale.  Prices are expensive.", 15, 4, 2);
	break;

begintalknode 20;
	state = 20;
	personality = 707;
	nextstate = 21;
	condition = 1;
	question = "Who were the watchers?";
	text1 = "Jackie says _They were the empires eyes and ears into Avernum, making sure that the scum was contained._";
	text2 = "_Now, of course, there is no need for them since the empire no longer uses the underworld as a prison._";
	text3 = "She sighs _I still miss the old days when we were more important to the empire._";

begintalknode 21;
	state = 21;
	personality = 707;
	nextstate = -1;
	condition = get_flag(231, 0) == 0;
	question = "There is a route to Avernum around here?";
	text1 = "Jackie answers _I believe so, but don't know._";
	text2 = "_The best place to find out would be if you can get into the watchers tower at the south end of town._";
	text3 = "_But the only one that can help you there might be Belinda.  I think her family were watchers at one time._";
	action = SET_SDF 7 13 1;

begintalknode 22;
	state = 21;
	personality = 707;
	nextstate = -1;
	condition = 1;
	question = "Thank you for the information.";
	text1 = "Jackie replies _You're welcome._";
	action = END_TALK;

// *** Laura ***
begintalknode 25;
	state = -1;
	personality = 708;
	nextstate = 26;
	condition = 1;
	question = "Laura";
	text1 = "A pretty brown hair woman is counting some beans into a bag.";
	text2 = "She looks suspiciously at the party before saying _I'm Laura._";
	text3 = "_What do you want?_";
	text5 = "Laura looks up at the party, seemingly wishing it'd go away.";
	text6 = "_What do you want?_ she asks surly.";
	action = INTRO;
	code =
		set_flag(7, 10, 1);
	break;

begintalknode 26;
	state = 26;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Laura appears ready to not answer, but finally says _I run the general store here in Farthest._";
	text2 = "_Either buy something or get out._";

begintalknode 27;
	state = 26;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "I'd like to buy something.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("General Store", "Laura provides an eclectic collection of items for sale.  Prices are astonomical.", 16, 6, 6);
	break;

begintalknode 30;
	state = -1;
	personality = 708;
	nextstate = 31;
	condition = 1;
	question = "Laura";
	text1 = "A pretty brown haired woman is busy scribbling in a ledger behind the counter of the store.";
	text2 = "She looks up and recognizes the party from Mayor Clunes message, and smiles.";
	text3 = "_Hi.  I'm Laura.  Can I help you?_";
	text5 = "Laura looks up from wiping the counter, recognizes the party, and says smiling _Hello again, what can I get for you?_";
	code =
		if (get_flag(7, 10) == 0) {
			set_flag(7, 10, 1);
			remove_string(5);
		}
		else {
			clear_strings();
			add_string(5);
		}
	break;

begintalknode 31;
	state = 31;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Laura grins _I run the general store here in Farthest._";
	text2 = "_Would you like to browse my wares?_";

begintalknode 32;
	state = 31;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "Who were the watchers?";
	text1 = "Laura answers _They were an empire group that maintained an vigil of the Avernum criminals._";
	text2 = "_There is a tower on the south side of town that they used to operate from._";
	text3 = "_Other than that, I don't know much about them._";

begintalknode 33;
	state = 31;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "What do you know about the she-devil?";
	text1 = "Laura breaks out laughing _That over-rated wanna-be come wailing through here awhile back._";
	text2 = "_She seem to be crying about losing something that she swore had been found and taken out through here._";
	text3 = "_We ran her out of town and she hasn't been back._";
	text4 = "_Of course, now that you taken care of her and her kind, no one else needs to worry about her._";
	code =
		if (get_flag(50, 1) == 0)
			remove_string(4);
	break;

begintalknode 34;
	state = 31;
	personality = 708;
	nextstate = -1;
	condition = 1;
	question = "Can I look at your wares?";
	text1 = "You finish looking at Laura's wares.";
	code =
		begin_shop_mode("General Store", "Laura provides an eclectic collection of items for sale.  Prices are expensive.", 16, 4, 2);
	break;

// *** Belinda ***
begintalknode 40;
	state = -1;
	personality = 709;
	nextstate = 41;
	condition = 1;
	question = "Belinda";
	text1 = "A pretty woman, wearing armor, is sorting leather straps behind the counter.";
	text2 = "She barely looks up before saying _I am Belinda._";
	text3 = "_What do you want?_";
	text5 = "Belinda looks up from working on a piece of armor.";
	text6 = "_You again.  What do you want?";
	action = INTRO;
	code =
		set_flag(7, 11, 1);
	break;

begintalknode 41;
	state = 41;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Belinda snorts saying _What do you think?_ pointing at the weapons and armor with prices greased on them.";

begintalknode 42;
	state = 41;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "Let me look at your stuff.";
	text1 = "You finish looking at Belinda's stuff.";
	code =
		begin_shop_mode("Swords and Armor", "Belinda has an assortment of weapons and armor available for sale.  Prices are astronomical.", 17, 6, 6);
	break;

begintalknode 45;
	state = -1;
	personality = 709;
	nextstate = 46;
	condition = 1;
	question = "Belinda";
	text1 = "A pretty woman, wearing armor, is stacking bracers behind the counter.";
	text2 = "She looks up, putting her hand on her sword, releasing it after recognizing the party from Mayor Clunes note.";
	text3 = "_Hello good travelers, I'm Belinda.  Can I help you with something?_";
	text5 = "Belinda looks up from working on a piece of armor with a frown.";
	text6 = "Recognizing the party, she smiles and says _Hello again, can I help you?_";
	code =
		if (get_flag(7, 11) == 0) {
			set_flag(7, 11, 1);
			remove_string(5);
			remove_string(6);
		}
		else {
			clear_strings();
			add_string(5);
			add_string(6);
		}
	break;

begintalknode 46;
	state = 46;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Belinda smiles wanly pointing at the various weapons and pieces of armor laying around.";
	text2 = "_I sell weapons and armor to those in need._ she says.";

begintalknode 47;
	state = 46;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "Who were the watchers?";
	text1 = "Belinda seems hesitant to answer, but then says _Because Major Clune spoke for you, let me tell you._";
	text2 = "_The watchers were the group that kept on eye on the happenings in Avernum._";
	text3 = "_They used to operate out of the tower on the south side of town._";
	text4 = "She smiles _They were true, unsung heroes of the empire._";

begintalknode 48;
	state = 46;
	personality = 709;
	nextstate = 51;
	condition = get_flag(50, 1) == 0;
	question = "What do you know of the she-devil?";
	text1 = "Belinda laughs _That street walker can running through town awhile back moaning about losing something._";
	text2 = "_We ran her out of town and she hasn't been back._";
	text3 = "_Of course that succubus did manage to draw some of the men-folk out, them fools._";
	text4 = "_We sure could've used the Demonslayer then._ she adds.";

begintalknode 49;
	state = 46;
	personality = 709;
	nextstate = -1;
	condition = get_flag(50, 1) > 0;
	question = "What do you know of the she-devil?";
	text1 = "Belinda laughs _That street walker can running through town awhile back moaning about losing something._";
	text2 = "_We ran her out of town and she hasn't been back._";
	text3 = "_Of course, since you've taken care of her, she won't draw anymore men-folk to their doom._";
	text4 = "_That was good work by the way._ Belinda adds shyly.";

begintalknode 50;
	state = 46;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "Can I see you things?";
	text1 = "You finish looking at Belinda's things.";
	code =
		begin_shop_mode("Swords and Armor", "Belinda has an assortment of weapons and armor available for sale.  Prices are expensive.", 17, 4, 2);
	break;

begintalknode 51;
	state = 51;
	personality = 709;
	nextstate = 52;
	condition = 1;
	question = "What is the Demonslayer?";
	text1 = "Belinda looks serious _It's a magical blade the does exceptional damage to demons._";
	text2 = "_It would've made short work of that she-devil and the kindred that showed up with her._";
	text3 = "_I remember hearing that a person named Terra in Avernum might know where it is._";

begintalknode 52;
	state = 52;
	personality = 709;
	nextstate = 53;
	condition = 1;
	question = "Is there a passage to Avernum around here?";
	text1 = "Belinda says _I believe so, but I don't know where it is._";

begintalknode 53;
	state = 53;
	personality = 709;
	nextstate = -1;
	condition = get_flag(7, 13) > 0;
	question = "Weren't some of your family watchers?";
	text1 = "Belinda seems surprised you know _Why yes they were._";
	text2 = "_In fact, I have the key to get into the watchers tower._";
	text3 = "She hands it to you _Perhaps there is something in there that will let you know where the passage is._";
	text4 = "_If you manage to find it, bring back the Demonslayer and take out that she-devil for good._";
	code =
		change_spec_item(6, 1);
	break;

begintalknode 54;
	state = 53;
	personality = 709;
	nextstate = -1;
	condition = 1;
	question = "Thanks for the information.";
	text1 = "Belinda smiles _No problem, glad to help empire agents._";
	text2 = "With that, she goes back to working on some armor behind the counter.";
	action = END_TALK;

// *** Thomas ***
begintalknode 60;
	state = -1;
	personality = 710;
	nextstate = 61;
	condition = 1;
	question = "Thomas";
	text1 = "A dust covered man is working on a piece of wood behind the counter.";
	text2 = "He looks up as the party enters the shop and mumbles _Name's Thomas._";
	text3 = "_What do you want?_";
	text5 = "Thomas doesn't even look at the party, but says _Don't touch anything unless you are going to buy it._";
	action = INTRO;
	code =
		set_flag(7, 12, 1);
	break;

begintalknode 61;
	state = 61;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Thomas answers _Not that it's any of your business, but I run the wood shop here in Farthest._";
	text2 = "_If you're buying something, then fine.  Otherwise, I'm not an oracle for you to quiz._";

begintalknode 62;
	state = 61;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "Let me see what you've got.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Farthest Woods", "Thomas has a varied selection of items for sale.  Prices are astronomical.", 18, 6, 6);
	break;

begintalknode 65;
	state = -1;
	personality = 710;
	nextstate = 66;
	condition = 1;
	question = "Thomas";
	text1 = "A dust covered man is working on a piece of wood behind the counter.";
	text2 = "He looks up and recognizes the party from Mayor Clunes note.";
	text3 = "He wipes his hands on a towel, then says smiling _Hello, I'm Thomas._";
	text4 = "_Is there something I can help you with?_";
	text5 = "Thomas looks up, recognizes the party, then asks smiling _Can I help you with something?_";
	code =
		if (get_flag(7, 12) == 0) {
			set_flag(7, 12, 1);
			remove_string(5);
		}
		else {
			clear_strings();
			add_string(5);
		}
	break;

begintalknode 66;
	state = 66;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Thomas replies _I run the wood shop here in Farthest._";
	text2 = "_I provide a variety of tools and knick-knacks for the wanting traveler._";
	text3 = "_Can I interest you in something?_";

begintalknode 67;
	state = 66;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "Who were the watchers?";
	text1 = "Thomas says _I don't know anything about them, other than there is an abandoned tower on the south side of town._";
	text2 = "_Perhaps others will know more._ he adds.";

begintalknode 68;
	state = 66;
	personality = 710;
	nextstate = 71;
	condition = get_flag(50, 1) == 0;
	question = "What do you know of the she-devil?";
	text1 = "Thomas says _She came tearing through town awhile back looking for something._";
	text2 = "_We ran her out of town and haven't seen her since._";
	text3 = "He pauses thoughtfully _Perhaps she was looking for that doll I'd bought from that explorer?_";

begintalknode 69;
	state = 66;
	personality = 710;
	nextstate = -1;
	condition = get_flag(50, 1) > 0;
	question = "What do you know of the she-devil?";
	text1 = "Thomas says _She came tearing through town awhile back looking for something._";
	text2 = "_We ran her out of town and haven't seen her since._";
	text3 = "_But of course she is now gone from this region, so there's no need to worry about her._";

begintalknode 70;
	state = 66;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "Let me shop you stuff.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Farthest Woods", "Thomas has a varied selection of items for sale.  Prices are expensive.", 18, 4, 2);
	break;

begintalknode 71;
	state = 71;
	personality = 710;
	nextstate = -1;
	condition = 1;
	question = "What did you do with the doll?";
	text1 = "Thomas thinks _I believe I sold that to another traveler a little while ago._";
	text2 = "_I remember hearing him say something about going to the Cresent Bowl area next._";
	text3 = "_Sorry I still don't have it, but perhaps you might be interested in something else in the store?_";
